// ml:run = $bin < input
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
struct node{
    int l, r, mn;
}tr[2900010];
int n, N;
int a[2000010];
void build(int id, int l, int r){
    tr[id].l=l;
    tr[id].r=r;
    if (l==r){
        tr[id].mn=a[l];
        return;
    }
    int mid=(l+r)/2;
    build(id<<1, l, mid);
    build(id<<1|1, mid+1, r);
    tr[id].mn=min(tr[id<<1].mn,  tr[id<<1|1].mn);
}
int getmn(int id, int l, int r){
    if (tr[id].l==l && tr[id].r==r)
        return tr[id].mn;
    if (r<=tr[id<<1].r) return getmn(id<<1, l, r);
    else if (l>=tr[id<<1|1].l) return getmn(id<<1|1, l, r);
    else return min(getmn(id<<1, l, tr[id<<1].r), getmn(id<<1|1, tr[id<<1|1].l, r));
}
int search(int id, int l, int r, int com){
    if (l==r) return l;
    int mid=(l+r)/2;
    int ll=getmn(1, l, mid), rr=getmn(1, mid+1, r);
    if (com==0){
        if (rr<a[id]) return search(id, mid+1, r, com);
        else return search(id, l, mid, com);
    }
    else{
        if (ll<a[id]) return search(id, l, mid, com);
        else return search(id, mid+1, r, com);
    }
}
int main()
{
    scanf("%d", &n);
    N=3*n;
    int mx=1000000009;
    for (int i=1;i<=n;i++){
        scanf("%d", &a[i]);
        mx=max(mx, a[i]);
        a[i+n]=a[i+2*n]=a[i];
    }
    build(1, 1, N);
    int ans[3], mn=2000000009;
    for (int i=1;i<=n;i++)
        if (a[i]!=mx){
            int l=search(i, 1, n+i-1, 0);
            int r=search(i, n+i+1, N, 1);
            if (r-l<mn){
                mn=r-l;
                ans[0]=(l-1)%n+1;
                ans[1]=(i-1)%n+1;
                ans[2]=(r-1)%n+1;
            }
        }
    printf("%d %d %d\n", ans[0], ans[1], ans[2]);
    return 0;
}

